import Main from '@/views/main'

/**
 * meta除了原生参数外可配置的参数:
 * meta: {
 *  hideInMenu: (false) 设为true后在左侧菜单不会显示该页面选项
 *  notCache: (false) 设为true后页面不会缓存 ****没有实现******
 *  access: (null) 可访问该页面的权限数组，当前路由设置的权限会影响子路由 *********没有实现*****
 *  icon: (-) 该页面在左侧菜单、面包屑和标签导航处显示的图标，如果是自定义图标，需要在图标名称前加下划线'_'
 *  hide: (false) 设为true此父级菜单不在左侧显示
 * }
 */
export default [
  {
    path: '/',
    name: 'index',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/views/index/index.vue')
  },
  {
    path: '/login',
    name: 'login',
    meta: {
      title: 'Login - 登录',
      hideInMenu: true
    },
    component: () => import('@/views/login/login.vue')
  },
  {
    path: '/home',
    name: 'home',
    component: Main,
    meta: {
      hideInMenu: true,
      title: '首页'
    }
  },
  {
    path: '/users',
    name: 'users',
    meta: {
      title: '用户中心',
      icon: 'md-people',
      hide: true
    },
    component: Main,
    children: [
      {
        path: 'user_list',
        name: 'user_list',
        meta: {
          title: '用户列表',
          icon: 'md-people'
        },
        component: () => import('@/views/user/user-list.vue')
      }
    ]
  },
  {
    path: '/setting',
    name: 'setting',
    component: Main,
    meta: {
      title: '系统设置',
      icon: 'ios-settings',
      hide: true
    },
    children: [
      {
        path: 'change_password',
        name: 'change_password',
        meta: {
          title: '修改密码',
          icon: 'md-lock'
        },
        component: () => import('@/views/setting/change-password.vue')
      },
      {
        path: 'nav_list',
        name: 'nav_list',
        meta: {
          title: '前台导航设置',
          icon: 'md-barcode'
        },
        component: () => import('@/views/setting/nav-list.vue')
      }
    ]
  }
]
